package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PricingRuleMapper;
import com.ruoyi.system.domain.PricingRule;
import com.ruoyi.system.service.IPricingRuleService;

/**
 * 计费规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-27
 */
@Service
public class PricingRuleServiceImpl implements IPricingRuleService 
{
    @Autowired
    private PricingRuleMapper pricingRuleMapper;

    /**
     * 查询计费规则
     * 
     * @param prId 计费规则主键
     * @return 计费规则
     */
    @Override
    public PricingRule selectPricingRuleByPrId(Long prId)
    {
        return pricingRuleMapper.selectPricingRuleByPrId(prId);
    }

    /**
     * 查询计费规则列表
     * 
     * @param pricingRule 计费规则
     * @return 计费规则
     */
    @Override
    public List<PricingRule> selectPricingRuleList(PricingRule pricingRule)
    {
        return pricingRuleMapper.selectPricingRuleList(pricingRule);
    }

    /**
     * 新增计费规则
     * 
     * @param pricingRule 计费规则
     * @return 结果
     */
    @Override
    public int insertPricingRule(PricingRule pricingRule)
    {
        return pricingRuleMapper.insertPricingRule(pricingRule);
    }

    /**
     * 修改计费规则
     * 
     * @param pricingRule 计费规则
     * @return 结果
     */
    @Override
    public int updatePricingRule(PricingRule pricingRule)
    {
        return pricingRuleMapper.updatePricingRule(pricingRule);
    }

    /**
     * 批量删除计费规则
     * 
     * @param prIds 需要删除的计费规则主键
     * @return 结果
     */
    @Override
    public int deletePricingRuleByPrIds(Long[] prIds)
    {
        return pricingRuleMapper.deletePricingRuleByPrIds(prIds);
    }

    /**
     * 删除计费规则信息
     * 
     * @param prId 计费规则主键
     * @return 结果
     */
    @Override
    public int deletePricingRuleByPrId(Long prId)
    {
        return pricingRuleMapper.deletePricingRuleByPrId(prId);
    }
}
